package com.cn.boot.jpa.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

//生成get ，set方法
@Entity(name = "user")
@Data
//生成链式调用方法
@Builder
//自动生成无参构造函数
@NoArgsConstructor
//自动生成有参构造函数
@AllArgsConstructor
/**
 * @author LXJ
 * date:2021-01-25
 * 用户信息实体类
 */
public class UserEntity {
    @Id
//    @GeneratedValue(strategy = GenerationType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    private String nickName;
    private String phone;
    private String email;
    private String code;
    private Integer status;
    private String password;
    private String icon;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String updateTime;



}
